# renames the input file/dir as the replacement strings
BEGIN {
}

function executeScript( str, replacement, sfile, inifile)
{
	cmd="awk -v r="str" -v Replacement="replacement" -f "sfile"  "inifile
	print cmd
	system(cmd)
}

{
if(NR==1) {
	SRC=$1
	DEST=$2
	#print SRC DEST
}

# skip the comments i.e lines starting with #
if( $0 !~ /#/ ) {

	#r=$1
	#Replacement=$2
	
	cmd="awk -v r="$1" -v Replacement="$2" -f BitteGerne.awk  FilesToCopy.txt"	
	#print cmd
	#system(cmd)
	
	# replace the contents of the files
	executeScript($1, $2, "ReplaceTextInFile.awk", "FilesToCopy.txt")
	#awk -v r=$3 -v Replacement=$4 -f ReplaceTextInFile.awk  FilesToCopy.txt
	
	# rename the files 
	#awk -v r=$3 -v Replacement=$4 -f BitteGerne.awk  FilesToCopy.txt
	#executeScript($1, $2, "BitteGerne.awk", "FilesToCopy.txt")
	
	# rename the dirs 
	#awk -v r=$3 -v Replacement=$4 -f BitteGerne.awk  DirsToCopy.txt
	#executeScript($1, $2, "BitteGerne.awk", "DirsToCopy.txt")
}

}

END {
	#print strings Replacements
}